import axios from "axios";
import { message } from "ant-design-vue";
const request = axios.create({
  timeout: 5000,
});
request.interceptors.request.use(
  (request) => {
    // request.headers.token = ''
    return request;
  },
  (err) => {
    return err;
  }
);
request.interceptors.response.use(
  (response) => {
    message.success("成功");
    return Promise.resolve(response.data);
  },
  (err) => {
    return Promise.reject(err);
  }
);
export const queryData_get = (params) => {
  return request({
    url: "https://randomuser.me/api",
    method: "GET",
    params: params,
    withCredentials: false,
  });
};

export const query = (params) => {
  return request({
    url: "https://wai.linrico.com/case/selectAllCase",
    method: "GET",
  });
};
